How do I mock a logger in my Python unit tests to avoid 'logger is not defined' error